VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form frmbuscarGestor 
   Caption         =   "Buscar: Paciente... Examen..."
   ClientHeight    =   9150
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   11400
   LinkTopic       =   "Form1"
   ScaleHeight     =   9150
   ScaleWidth      =   11400
   StartUpPosition =   2  'CenterScreen
   WindowState     =   2  'Maximized
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   5520
      TabIndex        =   13
      Top             =   4560
      Width           =   3855
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   5520
      TabIndex        =   12
      Top             =   3720
      Width           =   3855
   End
   Begin VB.TextBox Text2 
      Height          =   285
      Left            =   720
      TabIndex        =   11
      Top             =   3240
      Visible         =   0   'False
      Width           =   495
   End
   Begin VB.CommandButton Command4 
      Caption         =   "Buscar"
      BeginProperty Font 
         Name            =   "Eras Bold ITC"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   9480
      TabIndex        =   10
      Top             =   4560
      Width           =   1095
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Buscar"
      BeginProperty Font 
         Name            =   "Eras Bold ITC"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   9480
      TabIndex        =   9
      Top             =   3720
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Salir"
      BeginProperty Font 
         Name            =   "Eras Bold ITC"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   7560
      TabIndex        =   8
      Top             =   5520
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "Aceptar"
      BeginProperty Font 
         Name            =   "Eras Bold ITC"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   6120
      TabIndex        =   7
      Top             =   5520
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   720
      TabIndex        =   5
      Top             =   2880
      Visible         =   0   'False
      Width           =   495
   End
   Begin MSComCtl2.DTPicker DTPicker1 
      Height          =   375
      Left            =   4800
      TabIndex        =   2
      Top             =   2760
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   661
      _Version        =   393216
      Format          =   245563393
      CurrentDate     =   39944
   End
   Begin MSComCtl2.DTPicker DTPicker2 
      Height          =   375
      Left            =   7320
      TabIndex        =   3
      Top             =   2760
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   661
      _Version        =   393216
      Format          =   245563393
      CurrentDate     =   39944
   End
   Begin VB.Label SkinLabel1 
      Caption         =   "Desde:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4800
      TabIndex        =   0
      Top             =   2160
      Width           =   1575
   End
   Begin VB.Label SkinLabel2 
      Caption         =   "Hasta:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   7320
      TabIndex        =   1
      Top             =   2160
      Width           =   1575
   End
   Begin VB.Label SkinLabel3 
      Caption         =   "Paciente:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3840
      TabIndex        =   4
      Top             =   3720
      Width           =   1455
   End
   Begin VB.Label SkinLabel4 
      Caption         =   "Examen:"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3840
      TabIndex        =   6
      Top             =   4560
      Width           =   1695
   End
End
Attribute VB_Name = "frmbuscarGestor"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public cedula, f1, f2, examen
Private Sub Command1_Click()
    cedula = Text1.Text
    examen = Text2.Text
    f1 = Format(DTPicker1.Value, "mm/dd/yyyy")
    f2 = Format(DTPicker2.Value, "mm/dd/yyyy")
    FrmGestor.Buscar
    Unload Me: ActGestor
End Sub

Private Sub Command2_Click()
    Unload Me: ActGestor
End Sub

Private Sub Command3_Click()
    FrmBusqueda.CampoDefecto = "Nombres"
    FrmBusqueda.tabla = "select *from Paciente,Pedido  where pedido.cod_paciente=Paciente.cod_paciente and  nombres<>''"
    FrmBusqueda.UnicoCampo = False
    FrmBusqueda.CampoResultado = "paciente.cedula"
    FrmBusqueda.Show vbModal
    Text1.Text = FrmBusqueda.Resultado
End Sub

Private Sub Command4_Click()
    FrmBusqueda.CampoDefecto = "Descripcion"
    FrmBusqueda.tabla = "select *from examenes where descripcion <>''"
    FrmBusqueda.UnicoCampo = False
    FrmBusqueda.CampoResultado = "cod_examen"
    FrmBusqueda.Show vbModal
    Text2.Text = FrmBusqueda.Resultado
End Sub

Private Sub Form_Load()
    DTPicker1.Value = Date
    DTPicker2.Value = Date
End Sub

Private Sub Text1_Change()
    Text3.Text = MdlFunciones.CampoPaciente(Text1.Text, "NOMBRES")
End Sub

Private Sub Text2_Change()
    Text4.Text = MdlFunciones.CampoExamen(Text2.Text, "DESCRIPCION")
End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then Command3_Click
End Sub
